package com.shallowUniverse.process.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.shallowUniverse.process.entity.ApprovalDetails;
import com.shallowUniverse.process.exception.ApprovalNotExistException;
import com.shallowUniverse.process.exception.AuthenticationException;

import java.util.List;

/**
 * @author gs
 * @date create in 2020/12/11 16:33
 */
public interface ApprovalDetailsService {
    /**
     * description: 保存审批详情 <br/>
     * author: Shuai Guo   <br/>
     * date: 2021/7/20 <br/>
     * params: [approvalDetails] <br/>
     * return: int <br/>
     * version: 1.0
     */
    int save(ApprovalDetails approvalDetails) throws ApprovalNotExistException, AuthenticationException;

    /**
     * description: 根据审批单获取审批详情 <br/>
     * author: Shuai Guo   <br/>
     * date: 2021/7/20 <br/>
     * params: [approvalDetails] <br/>
     * return: java.util.List<com.qianyu.process.entity.ApprovalDetails> <br/>
     * version: 1.0
     */
    List<ApprovalDetails> find(ApprovalDetails approvalDetails);

    /**
     * description: 根据id查询详情 <br/>
     * author: Shuai Guo   <br/>
     * date: 2021/7/20 <br/>
     * params: [id] <br/>
     * return: com.qianyu.process.entity.ApprovalDetails <br/>
     * version: 1.0
     */
    ApprovalDetails findById(Long id);

    /**
     * description: 删除审批详情 <br/>
     * author: Shuai Guo   <br/>
     * date: 2021/7/20 <br/>
     * params: [ids, isLogic] <br/>
     * return: int <br/>
     * version: 1.0
     */
    int remove(List<Long> ids, boolean isLogic);

    /**
     * description: 根据审批单删除详情 <br/>
     * author: Shuai Guo   <br/>
     * date: 2021/7/20 <br/>
     * params: [approvalIds, isLogic] <br/>
     * return: int <br/>
     * version: 1.0
     */
    int removeByApproval(List<Long> approvalIds, boolean isLogic);

    /**
     * description: 根据审批单查询详情 <br/>
     * author: Shuai Guo   <br/>
     * date: 2021/7/20 <br/>
     * params: [page, approvalDetails] <br/>
     * return: com.baomidou.mybatisplus.core.metadata.IPage<com.qianyu.process.entity.ApprovalDetails> <br/>
     * version: 1.0
     */
    IPage<ApprovalDetails> findPage(IPage<ApprovalDetails> page, ApprovalDetails approvalDetails);
}
